Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ANT-like glob patterns #1856

Merged
merged 12 commits into from
Dec 13, 2023
Merged

Conversation

nulls
Copy link
Member

@nulls nulls commented Dec 11, 2023

What's done:

  • supported folders as input pattern
  • supported ../ in glob pattern
  • supported ! as exclude pattern
  • supported absolute globs

It closes #1854

### What's done:
- supported folders as input pattern
- supported ../ in glob pattern
- supported `!` as exclude pattern
Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (c20f2d5) 78.42% compared to head (ac5ced8) 78.54%.

Files Patch % Lines
...ain/kotlin/com/saveourtool/diktat/util/CliUtils.kt 87.87% 0 Missing and 4 partials ⚠️
...lin/com/saveourtool/diktat/cli/DiktatProperties.kt 0.00% 1 Missing ⚠️
...otlin/com/saveourtool/diktat/ktlint/KtLintUtils.kt 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1856      +/-   ##
============================================
+ Coverage     78.42%   78.54%   +0.11%     
  Complexity     2456     2456              
============================================
  Files           133      133              
  Lines          8641     8654      +13     
  Branches       2185     2189       +4     
============================================
+ Hits           6777     6797      +20     
+ Misses          894      883      -11     
- Partials        970      974       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Dec 11, 2023

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   4m 17s ⏱️ - 4m 2s
1 419 tests +5  1 382 ✔️ +4  37 💤 +1  0 ±0 
2 798 runs  +5  2 761 ✔️ +4  37 💤 +1  0 ±0 

Results for commit 11b1222. ± Comparison against base commit c20f2d5.

This pull request removes 4 and adds 9 tests. Note that renamed tests count towards both.
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithEmptyResult(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithGlobalPath(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithLeadingAsterisks(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithRelativePath(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithEmptyResult()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithFolder()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithGlobalPath()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithGlobalPattern()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithLeadingAsterisks()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithNegative()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithParentFolder()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithRelativePath()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithRelativePathWindows()

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Dec 11, 2023

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)

   164 files  ±0     164 suites  ±0   7m 11s ⏱️ +2s
1 419 tests +5  1 402 ✔️ +5  17 💤 ±0  0 ±0 
2 798 runs  +5  2 781 ✔️ +5  17 💤 ±0  0 ±0 

Results for commit 11b1222. ± Comparison against base commit c20f2d5.

This pull request removes 4 and adds 9 tests. Note that renamed tests count towards both.
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithEmptyResult(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithGlobalPath(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithLeadingAsterisks(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ walkByGlobWithRelativePath(Path)
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithEmptyResult()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithFolder()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithGlobalPath()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithGlobalPattern()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithLeadingAsterisks()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithNegative()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithParentFolder()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithRelativePath()
com.saveourtool.diktat.util.CliUtilsKtTest ‑ listByFilesWithRelativePathWindows()

♻️ This comment has been updated with latest results.

@nulls nulls closed this Dec 12, 2023
@nulls nulls reopened this Dec 12, 2023
@nulls nulls self-assigned this Dec 12, 2023
@nulls nulls marked this pull request as ready for review December 12, 2023 10:23
@nulls nulls enabled auto-merge (squash) December 12, 2023 10:23
@nulls nulls disabled auto-merge December 12, 2023 13:45
@nulls nulls enabled auto-merge (squash) December 12, 2023 13:45
@nulls nulls merged commit c047d84 into master Dec 13, 2023
19 checks passed
@nulls nulls deleted the feature/diktat-cli-arguments-pattern#1854 branch December 13, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Ant like patterns in Diktat CLI
2 participants